package com.wanho.java156.po;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
@Document(indexName = "index_product",type = "Product")
public class Product {
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column product.id
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    @Id
    @Field(type = FieldType.text, store = true)
    @Excel(name = "id")
    private String id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column product.productNum
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    @Field(type = FieldType.text, store = true)
    @Excel(name = "itemId")
    private String productnum;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column product.productName
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    @Field(type = FieldType.text, store = true, analyzer = "ik_smart")
    @Excel(name = "title")
    private String productname;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column product.cityName
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    @Field(type = FieldType.text, store = true, analyzer = "ik_smart")
    @Excel(name="city")
    private String cityname;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column product.DepartureTime
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    @Field(type = FieldType.Date, store = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @ExcelIgnore
    private Date departuretime;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column product.productPrice
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    @Field(type = FieldType.Integer, store = true)
    @Excel(name = "price")
    private Integer productprice;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column product.productDesc
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    @Field(type = FieldType.text, store = true, analyzer = "ik_smart")
    @ExcelIgnore
    private String productdesc;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column product.productStatus
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    @ExcelIgnore
    private Integer productstatus;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column product.id
     *
     * @return the value of product.id
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public String getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column product.id
     *
     * @param id the value for product.id
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column product.productNum
     *
     * @return the value of product.productNum
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public String getProductnum() {
        return productnum;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column product.productNum
     *
     * @param productnum the value for product.productNum
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public void setProductnum(String productnum) {
        this.productnum = productnum == null ? null : productnum.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column product.productName
     *
     * @return the value of product.productName
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public String getProductname() {
        return productname;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column product.productName
     *
     * @param productname the value for product.productName
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public void setProductname(String productname) {
        this.productname = productname == null ? null : productname.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column product.cityName
     *
     * @return the value of product.cityName
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public String getCityname() {
        return cityname;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column product.cityName
     *
     * @param cityname the value for product.cityName
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public void setCityname(String cityname) {
        this.cityname = cityname == null ? null : cityname.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column product.DepartureTime
     *
     * @return the value of product.DepartureTime
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public Date getDeparturetime() {
        return departuretime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column product.DepartureTime
     *
     * @param departuretime the value for product.DepartureTime
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public void setDeparturetime(Date departuretime) {
        this.departuretime = departuretime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column product.productPrice
     *
     * @return the value of product.productPrice
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public Integer getProductprice() {
        return productprice;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column product.productPrice
     *
     * @param productprice the value for product.productPrice
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public void setProductprice(Integer productprice) {
        this.productprice = productprice;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column product.productDesc
     *
     * @return the value of product.productDesc
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public String getProductdesc() {
        return productdesc;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column product.productDesc
     *
     * @param productdesc the value for product.productDesc
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public void setProductdesc(String productdesc) {
        this.productdesc = productdesc == null ? null : productdesc.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column product.productStatus
     *
     * @return the value of product.productStatus
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public Integer getProductstatus() {
        return productstatus;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column product.productStatus
     *
     * @param productstatus the value for product.productStatus
     *
     * @mbg.generated Thu Apr 08 16:15:13 CST 2021
     */
    public void setProductstatus(Integer productstatus) {
        this.productstatus = productstatus;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id='" + id + '\'' +
                ", productnum='" + productnum + '\'' +
                ", productname='" + productname + '\'' +
                ", cityname='" + cityname + '\'' +
                ", departuretime=" + departuretime +
                ", productprice=" + productprice +
                ", productdesc='" + productdesc + '\'' +
                ", productstatus=" + productstatus +
                '}';
    }
}